<?php
include ("include.php");
$tintuc = new class_tintuc();
$langid = $HTTP_GET_VARS["langid"];
$catid = $HTTP_GET_VARS["catid"];
$subcatid = $HTTP_GET_VARS["subcatid"];
if($subcatid > 0){
	$id = $subcatid;
}else{
	$id = $catid;
}

if ($langid == ""){
	$langid = 0;
}

//Layout
$layout_file = $arr_layout[$langid][0];
include("html_layout.php");


$sql = "select * from tintuc where langid='$langid' and tintuc_cat='$id' order by orders ASC";
$str_content = $tintuc->list_noidung($sql, 1, TINTUC_IMAGES_SMALL_WIDTH, $which_page);
$str_htm = ereg_replace("@noidung@", "$str_content", $str_htm);

//Header Loading - CSS, Meta, Javascript ...
include("html_header.php");

//Body Loading - Date-Time, ...
include("html_body.php");	

//Menu include
include("html_menu.php");

//Modules include
include("modules.php");

print $str_htm;
?>